

<div class="ncs-sidebar-container ncs-class-bar">
    <div class="title">
        <h4 class="store-title">商品分类</h4>
    </div>
    <div class="content">
        <p><span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '1', 'order' => '2'));?>">按新品</a></span><span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '2', 'order' => '2'));?>">按价格</a></span><span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '3', 'order' => '2'));?>">按销量</a></span><span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '5', 'order' => '2'));?>">按人气</a></span>
        </p>
        <div class="ncs-search">
            <form id="" name="searchShop" method="get" action="index.php" >
                <input type="hidden" name="act" value="show_store" />
                <input type="hidden" name="op" value="goods_all" />
                <input type="hidden" name="store_id" value="<?php echo $store_info['store_id'];?>" />
                <input type="text" class="text w120" name="inkeyword" value="<?php echo $_GET['inkeyword'];?>" placeholder="搜索店内商品"><a href="javascript:document.searchShop.submit();" class="ncbtn">全站搜</a>
            </form>
        </div>
        <ul class="ncs-submenu">
            <li><span class="ico-none"><em>-</em></span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id']));?>">全部商品</a></li>
            <?php if(!empty($goods_class_list) && is_array($goods_class_list)){?>
            <?php foreach($goods_class_list as $value){?>
            <?php if(!empty($value['children']) && is_array($value['children'])){?>
            <li><span class="ico-none" onclick="class_list(this);" span_id="<?php echo $value['stc_id'];?>" style="cursor: pointer;"><em>-</em></span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'stc_id' => $value['stc_id']));?>"><?php echo $value['stc_name'];?></a>
                <ul id="stc_<?php echo $value['stc_id'];?>">
                    <?php foreach($value['children'] as $value1){?>
                    <li><span class="ico-sub">&nbsp;</span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'stc_id' => $value1['stc_id']));?>"><?php echo $value1['stc_name'];?></a></li>
                    <?php }?>
                </ul>
            </li>
            <?php }else {?>
            <li> <span class="ico-none"><em>-</em></span><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'stc_id' => $value['stc_id']));?>"><?php echo $value['stc_name'];?></a></li>
            <?php }?>
            <?php }?>
            <?php }?>
        </ul>

    </div>
</div>



<div class="ncs-sidebar-container ncs-top-bar">
    <div class="title">
        <h4 class="store-title">商品排行</h4>
    </div>
    <div class="content">
        <ul class="ncs-top-tab pngFix">
            <li id="hot_sales_tab" class="current"><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '3', 'order' => '2'));?>">热销商品</a></li>
            <li id="hot_collect_tab"><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id'], 'key' => '4', 'order' => '2'));?>">人气商品</a></li>
        </ul>
        <div id="hot_sales_list" class="ncs-top-panel">
            <?php if(is_array($hot_sales) && !empty($hot_sales)){?>
            <ol>
                <?php foreach($hot_sales as $val){?>
                <li>
                    <dl>
                        <dt><a title="<?php echo $val['goods_name']?>" href="<?php echo url('shop/Goods/index',array('goods_id'=>$val['goods_id']));?>"><?php echo $val['goods_name']?></a></dt>
                        <dd class="goods-pic"><a title="<?php echo $val['goods_name']?>" href="<?php echo url('shop/Goods/index', array('goods_id'=>$val['goods_id']));?>"><span class="thumb size60"><i></i>
                        	<img src="__UPLOAD_PATH__/shop/common/loading.gif" rel="lazy" data-url="<?php echo thumb($val, 60);?>"  onload="javascript:DrawImage(this,60,60);"></span></a>
                            <p><span class="thumb size100"><i></i><img src="__UPLOAD_PATH__/shop/common/loading.gif" rel="lazy" data-url="<?php echo thumb($val, 240);?>" onload="javascript:DrawImage(this,100,100);" title="<?php echo $val['goods_name']?>"><big></big><small></small></span></p>
                        </dd>
                        <dd class="price pngFix"><?php echo ncPriceFormat($val['goods_promotion_price']);?></dd>
                        <dd class="selled pngFix"><?php echo $lang['nc_sell_out'];?><strong><?php echo $val['goods_salenum'];?></strong>笔</dd>
                    </dl>
                </li>
                <?php }?>
            </ol>
            <?php }?>
        </div>
        <div id="hot_collect_list" class="ncs-top-panel hide">
            <?php if(is_array($hot_collect) && !empty($hot_collect)){?>
            <ol>
                <?php foreach($hot_collect as $val){?>
                <li>
                    <dl>
                        <dt><a href="<?php echo url('shop/Goods/index', array('goods_id'=>$val['goods_id']));?>"><?php echo $val['goods_name']?></a></dt>
                        <dd class="goods-pic"><a href="<?php echo url('shop/Goods/index', array('goods_id'=>$val['goods_id']));?>" title=""><span class="thumb size60"><i></i> 
                        	<img src="__UPLOAD_PATH__/shop/common/loading.gif"  rel="lazy" data-url="<?php echo thumb($val, 60);?>" onload="javascript:DrawImage(this,60,60);"></span></a>
                            <p><span class="thumb size100"><i></i><img src="__UPLOAD_PATH__/shop/common/loading.gif"  rel="lazy" data-url="<?php echo thumb($val, 240);?>" onload="javascript:DrawImage(this,100,100);" title="<?php echo $val['goods_name']?>"><big></big><small></small></span></p>
                        </dd>
                        <dd class="price pngFix"><?php echo ncPriceFormat($val['goods_promotion_price']);?></dd>
                        <dd class="collection pngFix">收藏人气：<strong><?php echo $val['goods_collect'];?></strong></dd>
                    </dl>
                </li>
                <?php }?>
            </ol>
            <?php }?>
        </div>
        <p><a href="<?php echo url('shop/Showstore/goods_all', array('store_id' => $store_info['store_id']));?>">查看本店其他商品</a></p>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        //热销排行切换
        $('#hot_sales_tab').on('mouseenter', function() {
            $(this).addClass('current');
            $('#hot_collect_tab').removeClass('current');
            $('#hot_sales_list').removeClass('hide');
            $('#hot_collect_list').addClass('hide');
        });
        $('#hot_collect_tab').on('mouseenter', function() {
            $(this).addClass('current');
            $('#hot_sales_tab').removeClass('current');
            $('#hot_sales_list').addClass('hide');
            $('#hot_collect_list').removeClass('hide');
        });
    });
    /** left.php **/
    // 商品分类
    function class_list(obj){
        var stc_id=$(obj).attr('span_id');
        var span_class=$(obj).attr('class');
        if(span_class=='ico-block') {
            $("#stc_"+stc_id).show();
            $(obj).html('<em>-</em>');
            $(obj).attr('class','ico-none');
        }else{
            $("#stc_"+stc_id).hide();
            $(obj).html('<em>+</em>');
            $(obj).attr('class','ico-block');
        }
    }
</script>
